{% load static %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>PyGeek | 注册</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">


</head>
<body class="hold-transition" style="background-image: url(https://s2.loli.net/2022/01/04/tDLbflqXz1srwv2.jpg);">
<div class="register-box" style="width: 210px; height: 500px; margin: auto;">
    <!-- <div class="register-logo">
        <a href=""><b>Ali</b><span class="small">CRM</span></a>
    </div> -->

    <div class="register-box-body" style="text-align: center;">
        <p class="login-box-msg" style="font-size: larger; font-family: 'Courier New', Courier, monospace; margin-top: 70px; color: white;"><b>注册一个帐号</b></p>
        <form action="{% url 'register' %}" method="post" novalidate>
            {% csrf_token %}
            <div class="form-group has-feedback">
                <input type="text" class="form-control" placeholder="用户名" name="username" style="margin: 10px  0; height: 35px; width: 200px; font-size: medium;">
                <span class="glyphicon glyphicon-user form-control-feedback"></span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.username.errors.0 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.username.errors.1 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.username.errors.2 }}</span>
            </div>

            <div class="form-group has-feedback">
                <input type="text" class="form-control" placeholder="姓" name="last_name" style="margin: 10px  0; height: 35px; width: 200px; font-size: medium;">
                <span class="glyphicon glyphicon-phone form-control-feedback"></span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.last_name.errors.0 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.last_name.errors.1 }}</span>
                <input type="text" class="form-control" placeholder="名" name="first_name" style="margin: 10px  0; height: 35px; width: 200px; font-size: medium;">
                <span class="glyphicon glyphicon-phone form-control-feedback"></span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.first_name.errors.0 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.first_name.errors.1 }}</span>
            </div>

            <div class="form-group has-feedback">
                <input type="password" class="form-control" placeholder="密码" name="password" style="margin: 10px  0; height: 35px; width: 200px; font-size: medium;">
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.password.errors.0 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.password.errors.1 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.password.errors.2 }}</span>
            </div>
            
            <div class="form-group has-feedback">
                <input type="password" class="form-control" placeholder="确认密码" name="r_password" style="margin: 10px  0; height: 35px; width: 200px; font-size: medium;">
                <span class="glyphicon glyphicon-log-in form-control-feedback"></span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.r_password.errors.0 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.r_password.errors.1 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.r_password.errors.2 }}</span>
            </div>

            <div class="form-group has-feedback">
                <input type="email" class="form-control" placeholder="邮箱" name="email" style="margin: 10px  0; height: 35px; width: 200px; font-size: medium;">
                <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.email.errors.0 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.email.errors.1 }}</span>
            </div>
            
            <div class="form-group has-feedback">
                <input type="text" class="form-control" placeholder="学号" name="student_id" style="margin: 10px  0; height: 35px; width: 200px; font-size: medium;">
                <span class="glyphicon glyphicon-phone form-control-feedback"></span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.student_id.errors.0 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.student_id.errors.1 }}</span>
            </div>
            
            <div class="form-group has-feedback">
                <input type="text" class="form-control" placeholder="电话" name="phone" style="margin: 10px  0; height: 35px; width: 200px; font-size: medium;">
                <span class="glyphicon glyphicon-phone form-control-feedback"></span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.phone.errors.0 }}</span>
                <span class="has-error" style="color:#e4e3e3">{{ form_obj.phone.errors.1 }}</span>
            </div>

            <div class="row">
                <div class="col-xs-8">
                    <div class="checkbox icheck"  style="font-family: '楷体'; margin-top: 5px;">
                        <label>
                            <input type="checkbox" value="1" name='checkbox'><b>我同意该<a href="#">条款</a></b>
                        </label>
                        <br>
                        <span class="has-error" style="color:#e4e3e3">{{ form_obj.checkbox.errors.0 }}</span>
                    </div>
                </div>
                <!-- /.col -->
                <div class="col-xs-4">
                    <button type="submit" class="btn btn-primary btn-block btn-flat" style="width: 200px;  
                    height: 40px;
                    margin-top: 20px;
                    margin-bottom: 30px;
                    padding:8px;  
                    background-color: #f7f7f7;  
                    border-color: #e4e3e3;  
                    color: #383535;  
                    -moz-border-radius: 10px;  
                    -webkit-border-radius: 10px;  
                    border-radius: 10px; /* future proofing */  
                    -khtml-border-radius: 10px; /* for old Konqueror browsers */  
                    text-align: center;  
                    vertical-align: middle;  
                    border: 1px solid transparent;  
                    font-weight: 900;  
                    font-size:125%;  
                    font-family: 'Courier New', Courier, monospace;">注册</button>
                </div>
                <!-- /.col -->
            </div>
        </form>

        <a href="{% url 'login' %}" class="text-center" style="text-decoration:none;
        font-family: '楷体';
        color: #0c1320;
        font-size: 18px;"><b>已有账号，点击此处去登录</b></a>
    </div>
    <!-- /.form-box -->
</div>
<!-- /.register-box -->

<!-- jQuery 3 -->
<script src="{% static 'adminlte/bower_components/jquery/dist/jquery.min.js' %}"></script>
<!-- Bootstrap 3.3.7 -->
<script src="{% static 'adminlte/bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>
<!-- iCheck -->
<script src="{% static 'adminlte/plugins/iCheck/icheck.min.js' %}"></script>
<script>
    $(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' /* optional */
        });
    });
</script>
</body>
</html>
